﻿namespace OnWork.DataCenter.Shared.Data
{
    /// <summary>
    /// 孙与祖通信对象
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class CascadingModel<T>
    {
        public CascadingModel()
        {
        }

        public CascadingModel(T defaultValue)
        {
            _value = defaultValue;
        }

        public Action StateHasChanged;

        private T _value;

        public T Value
        {
            get => _value;
            set
            {
                _value = value;
                StateHasChanged?.Invoke();
            }
        }
    }
}